<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>arr.every()</title>
</head>
<body>
    
</body>
<script>
    var arr = [1,2,3,4,5];
    //arr.every() 测试数组内所有元素 是否通过测试
    arr.forEach(function(value,index,arr){console.log('研究数组: '+ arr)});
    var result = arr.every(function(value){
        return value > 1;
        });
        console.log('every(): '+ result);
    //some 有满足条件的 就回返回true
    var result1 = arr.some(function(value){return value = 3;});
    console.log('some(): '+result1);

</script>
</html>